package com.sjlh.centurylianhua.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Inventory {
    @TableId(type= IdType.AUTO)//主键自增
    private Integer id;//库存id
    @TableField(value="productId")
    private Integer productId;//所属商品
    @TableField(exist = false)//不放入数据库执行
    private String productname;//商品名称
    @TableField(value="depotId")
    private Integer depotId;//所属仓库
    @TableField(exist = false)
    private String depotname;//仓库名称
    @TableField(value="depotNum")
    private Integer depotNum;//仓库数量
    @TableField(value="topXian")
    private Integer topXian;//库存数量上限
    @TableField(value="downXian")
    private Integer downXian;//库存数量下限

    @TableField(exist = false)
    private String name;//商品名称
    @TableField(exist = false)
    private Integer proId;//所属商品
    @TableField(exist = false)
    private String shou;//售价
    @TableField(exist = false)
    private String danWei;//单位

    private String standby1;//备用字段1
    private String standby2;//备用字段2
    private String standby3;//备用字段3

    public Inventory(Integer productId, Integer depotId, Integer depotNum) {
        this.productId = productId;
        this.depotId = depotId;
        this.depotNum = depotNum;
    }
}
